// MenuPageQueryVO.java
package com.ddm.vo.page;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.ddm.entity.Level1;
import com.ddm.entity.Term;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * MenuPageQueryVO
 */
@Data
public class MenuPageQueryVO {
    /**
     * 一级指标
     */
    private List<Level1> level1;
    /**
     * 标准id
     */
    private Long id;
    /**
     * 级别分类【国家、地方、企业】
     */
    private String type;
    /**
     * 标准名称
     */
    private String standardName;
    private List<Term> terms;
    private LocalDateTime publicationDate;

    public void setTerms(List<Term> terms){
        if (CollectionUtils.isNotEmpty(terms)) {
            this.terms = new ArrayList<>();
            this.terms.addAll(terms);
        }
    }

    public void setLevel1(List<Level1> level1List) {
        if (CollectionUtils.isNotEmpty(level1List)) {
            this.level1 = new ArrayList<>();
            this.level1.addAll(level1List);
        }
    }
}